package com.wolf.controller;

import com.wolf.pojo.Wl_subject;
import com.wolf.service.Wl_subjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@ComponentScan
public class Wl_subjectController {

    @Autowired
    private Wl_subjectService wl_subjectService;

    public void setWl_subjectService(Wl_subjectService wl_subjectService) {
        this.wl_subjectService = wl_subjectService;
    }

    /**
     * 查询所有
     * @param modelMap
     * @return
     */
    @RequestMapping("wl_subject_getall")
    public String getAll(ModelMap modelMap){

        List<Wl_subject> list = wl_subjectService.getAll();

        modelMap.addAttribute("wl_subject_list",list);

        return "wl_banner_insert";
    }
}
